#pragma once

#define NOMINMAX

#include <wx/string.h>

#include <wx/wx.h>
#include <wx/propdlg.h>
#include <wx/stdpaths.h>
#include <wx/filename.h>

#include <wx/wfstream.h>
#include <wx/dir.h>
#include <wx/generic/progdlgg.h>
#include <wx/spinctrl.h>
#include <wx/filepicker.h>

#include <wx/wxprec.h>

#define uint unsigned int

#define u8  unsigned __int8
#define u16 unsigned __int16
#define u32 unsigned __int32
#define u64 unsigned __int64

#define s8  signed __int8
#define s16 signed __int16
#define s32 signed __int32
#define s64 signed __int64

template<typename T>
static void safe_realloc(T* ptr, uint new_size)
{
	if(new_size == 0) return;
	ptr = (T*)((ptr == NULL) ? malloc(new_size * sizeof(T)) : realloc(ptr, new_size * sizeof(T)));
}

#define safe_delete(x) {free(x);(x)=NULL;}

#include "Utilities/Thread.h"
#include "Utilities/Array.h"
#include "Utilities/Timer.h"
#include "Utilities/IdManager.h"